package com.bawei.mall.cart.domain.model;

import com.bawei.mall.cart.domain.req.CartAddReq;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CartAddModel {


    /**
     * 商品Id
     */
    private Long productId;


    /**
     * 商品规格
     */
    private String productSku;


    /**
     * 添加数量
     */
    private Long number;



    public  static  CartAddModel  cartAddReqBuild(CartAddReq cartAddReq){
        return  CartAddModel.builder()
                .productId(cartAddReq.getProductId())
                .productSku(cartAddReq.getProductSku())
                .number(cartAddReq.getNumber())
                .build();
    }


}
